package com.elbis.business.entity.messages;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.elbis.business.entity.DataBaseConstants;

@Entity
@Table(name = DataBaseConstants.TABLE_INFORMATIVE_MESSAGES, catalog = DataBaseConstants.CATALOG)
public class InformativeMessage implements Serializable {

	private static final long serialVersionUID = -8657380080074206449L;

	private Long id;
	@Size(max = 100)
	@NotNull
	private String message;
	@NotNull
	@Size(max = 2, min = 2)
	private String language;
	@NotNull
	private Integer number;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", nullable = false)
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @param message
	 *            the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * @return the language
	 */
	public String getLanguage() {
		return language;
	}

	/**
	 * @param language
	 *            the language to set
	 */
	public void setLanguage(String language) {
		this.language = language;
	}

	/**
	 * @return the number
	 */
	public Integer getNumber() {
		return number;
	}

	/**
	 * @param number
	 *            the number to set
	 */
	public void setNumber(Integer number) {
		this.number = number;
	}

	@Override
	public String toString() {
		return message;
	}

}
